<script>
	import store from '@/store/index';
	export default {
		onLaunch: function(option) {
			//取出缓存数据
			store.commit('setCacheData');
			if (store.state.$userInfo == null) {
				if (option.path != '/pages/index/login') {
					uni.redirectTo({
						url: '/pages/index/login'
					});
				}
			}
			store.dispatch('getTreeData');
		},
		onShow: function() {},
		onHide: function() {},
	};
</script>

<style lang="scss">
	/*每个页面公共css */
	@import '@/uni_modules/uview-ui/index.scss';
	@import 'common/demo.scss';
</style>